/**
 * create 30san 2019-03-18 15:21
 * desc:
 */

import React, {Component} from 'react';
import {Button, StyleSheet, Text, View} from 'react-native';
import HomeDetailScreen1 from './HomeDetailScreen1';
import HomeDetailScreen2 from './HomeDetailScreen2';
import HomeDetailScreen3 from './HomeDetailScreen3';
import {
    createStackNavigator,
    createMaterialTopTabNavigator,
} from "react-navigation";

//createMaterialTopTabNavigator(RouteConfigs, TabNavigatorConfig);
const TopTabNavigatorConfigs = {
    HomeDetailScreen1 : HomeDetailScreen1,
    HomeDetailScreen2 : HomeDetailScreen2,
    HomeDetailScreen3 : HomeDetailScreen3,
};

const TabNavigatorConfig = {
    initialRouteName: "HomeDetailScreen1",
};

const TopTabNavigator = createMaterialTopTabNavigator(TopTabNavigatorConfigs, TabNavigatorConfig);

// createStackNavigator(RouteConfigs, StackNavigatorConfig)
const HomeScreen = createStackNavigator({
    HomeStack: TopTabNavigator
},{
    initialRouteName: "HomeStack",
    defaultNavigationOptions: {
        headerStyle: {
            backgroundColor: '#f4511e',
        },
        headerTintColor: '#fff',
        headerTitleStyle: {
            fontWeight: 'bold',
        },
        headerTitle: 'Home'
    },
});

export default HomeScreen;

// export default class HomeScreen extends Component {
//     render() {
//         return (
//             <HomeStackNavigator/>
//         )
//     }
// }